<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>Vue:ajax请求</title>
		<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
		<script src='js/axios.js' type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<table id="app" border="1" width="300px">
			<tr v-for="item in result">
				<td>{{item.id}}</td>
				<td>{{item.name}}</td>
				<td>{{item.age}}</td>
			</tr>
		</div>
		</table>
		<script type="text/javascript">
			new Vue({
				el: '#app',
				data: {
					result: []
				},
				created: function () {
					axios.get('js/request.json').then(function(result){
						console.log(typeof result.data);
						this.result = result.data;
					}.bind(this));
				}
			});
		</script>
	</body>
</html>
